cPanel Config

Loan Manager

levitraCialisZappos

Welcome to cPanelConfig the fastest growing cPanel configuration and troubleshooting guide on the internet. Please take the time and register. We would love to have your contribution to this completely free cPanel resource. We are updating this daily so be sure to visit us on a regular basis.

Secure the /tmp partition

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Posted by yolau


If you are running a shared hosting server is a very bad idea to allow perl scripts to run from /tmp
If have to have a separate /tmp partition mounted with noexec.
This is far from bullet proof but will add one more layer in your server security.

cPanel has a built in script that will mount a separate /tmp partition with noexec, all you have to do is call:

/scripts/securetmp

This will look something like:

Would you like to secure /tmp & /var/tmp at boot time? (y/n) y
Would you like to secure /tmp & /var/tmp now? (y/n) y
Securing /tmp & /var/tmp

For ultimate security I recommend using a perl wrapper. I may write a tutorial about this in the next few days so check this site from time to time.

Share this:
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • De.lirio.us
  • Furl
  • MyShare
  • Smarking
  • Technorati
  • YahooMyWeb

If you enjoyed this post, make sure you subscribe to my RSS feed!

4 Responses to “Secure the /tmp partition”

  1. This was very helpful.

    I think it would be great if you could also write a how to on resizing the tmp partition.

    Most tmp partitions are 500M but they should be 1G.

  2. Thanks for the informative article!

  3. When I run this script, I get the following:

    root@server [~]# /scripts/securetmp
    Would you like to secure /tmp & /var/tmp at boot time? (y/n) y
    Would you like to secure /tmp & /var/tmp now? (y/n) y
    Securing /tmp & /var/tmp
    The system does not support loop devices.

    Then the script exits without applying any changes.

    Any ideas?

  4. same for me, i run /scripts/securetmp on my vps server.

Leave a Reply